// JavaScript Document
	function reset()
	{
		document.getElementById("rooms0adultsCount").value=2;
		document.getElementById("rooms0childrenCount").value=0;
		document.getElementById("room_number").value=1;
	}
	function add_room()
	{
		var rooms_number= document.getElementById("room_number").value;
//		alert(rooms_number);
		
		for(i=1;i<=8;i++)
		{	
			if(i<=rooms_number)
			{
				if(document.getElementById('room'+i).style.display!="inline")
				{
					var index=i-1;
					
					document.getElementById('room'+i).style.display="inline";
					document.getElementById("rooms"+index+"adultsCount").value=2;
					document.getElementById("rooms"+index+"childrenCount").value=0;
					for(j=1;j<=3;j++)
					{
						document.getElementById("rooms"+index+"children"+j).style.display="none";

					}
				}
			}
			else
			{
				document.getElementById('room'+i).style.display="none";
			}
			
		}
		
		
	}
//displays children ages drop down boxes for a specific room
	function add_child(room_number)
	{
		//alert("The value has been changed.")
		var children_number = document.getElementById("rooms"+room_number+"childrenCount").value;
		
		for(i=1;i<=3;i++)
		{
			if(i<=children_number)
			{
				if(document.getElementById("rooms"+room_number+"children"+i).style.display!="inline")
				{
					document.getElementById("rooms"+room_number+"children"+i).style.display="inline";
				 	document.getElementById("rooms"+room_number+"children"+i).value=7;
				}

			}
			else
			{
				document.getElementById("rooms"+room_number+"children"+i).style.display="none";
			}
		}

	}
	